<template>
    <n-card :title="item.type" v-for="item in state.listInfo" > {{item.type}} </n-card>
</template>

<script setup lang="ts">
import { NCard } from 'naive-ui'
import { reactive,ref ,toRefs} from 'vue'
import { getList } from '../http/services/list'

type List = {
    title: number,
    description: string,
    adIndex:string,
    type:string
}

let listData = ref<List[]>([])

let state = reactive({
    listInfo:[] as List[]
})

// 获取列表数据
getList().then(res => {
    
    // listData.value = res.data.itemList
    state.listInfo = res.data.itemList
    
})

</script>

<style scoped>
.aa .n-layout-scroll-container {
    padding: 0px !important;
}
.n-card {
  max-width: 300px;
}
</style>